package code.main.view.hall
{
	import code.common.assets.AssetsClassName;
	import code.main.modle.lang.Language;
	
	import com.yy.manager.ResourceManager;
	import com.yy.tools.graphics.GT;
	
	import flash.display.Sprite;

	public class NavView extends Sprite
	{
		private var _left:Sprite;
		public function NavView()
		{
			_left = new Sprite();
			addChild(_left);
			_left.y = 115;
			var navData:Array = [
				{cls:"TaskIcon", lable:Language.HALL_NAV_CONTENT[0]},
				{cls:"GiftShopIcon", lable:Language.HALL_NAV_CONTENT[1]},
				{cls:"ProfileIcon", lable:Language.HALL_NAV_CONTENT[2]},
				{cls:"GetChipsIcon", lable:Language.HALL_NAV_CONTENT[3]},
			];
			var ni:NavItem;
			var i:int;
			var len:int = navData.length;
			var obj:Object;
			var arr:Array = [];
			for(i=0; i<len; i++) {
				obj = navData[i];
				ni = new NavItem(obj.lable, ResourceManager.getSpriteByName(AssetsClassName[obj.cls]));
				arr.push(ni);
			}
			GT.verticalLayout(_left, arr, 0, 2);
		}
	}
}